Repository navigation
Generate C++17-compatible bindings - #3
Merged
Merged
Conversation
alan-george-lk
added this pull request to stack #4
September 15, 2026 03:44
alan-george-lk
force-pushed
the
livekit/uniffi-0.31-cpp17
branch
from
September 15, 2026 04:01
1b6a87a to
69dd556
Compare
alan-george-lk
force-pushed
the
livekit/uniffi-0.31-cpp17
branch
from
September 15, 2026 04:30
69dd556 to
f18ea96
Compare
alan-george-lk
force-pushed
the
livekit/uniffi-0.31
branch
from
September 15, 2026 04:30
cb233a9 to
cf5ac7c
Compare
alan-george-lk
force-pushed
the
livekit/uniffi-0.31-cpp17
branch
from
September 15, 2026 15:35
f18ea96 to
0ed332d
Compare
alan-george-lk
commented
Sep 15, 2026
| } | ||
| private: | ||
| // Avoid platform-specific endian APIs while retaining C++17 compatibility. | ||
| static bool native_byte_order_is_little_endian() { |
Collaborator
Author
There was a problem hiding this comment.
I think this is the biggest loss of the downgrade, not having native std::endian support is unfortunate. But this is a very small impl to get equivalency
xianshijing-lk
approved these changes
Sep 15, 2026
xianshijing-lk
approved these changes
Sep 15, 2026
| // Avoid platform-specific endian APIs while retaining C++17 compatibility. | ||
| static bool native_byte_order_is_little_endian() { | ||
| const uint16_t value = 1; | ||
| return *reinterpret_cast<const unsigned char *>(&value) == 1; |
There was a problem hiding this comment.
nit, wonder if it is slightly more clear to do
static bool native_byte_order_is_little_endian() {
const std::uint16_t value = 1;
const auto* bytes = reinterpret_cast<const unsigned char*>(&value);
return bytes[0] == 1;
}
alan-george-lk
force-pushed
the
livekit/uniffi-0.31-cpp17
branch
from
September 16, 2026 15:23
0ed332d to
433eae1
Compare
alan-george-lk
force-pushed
the
livekit/uniffi-0.31-cpp17
branch
2 times, most recently
from
September 22, 2026 18:43
2abac60 to
7d04286
Compare
alan-george-lk
removed this pull request from stack #4
September 22, 2026 19:04
alan-george-lk
changed the base branch from
livekit/uniffi-0.31
to
livekit/dev
September 22, 2026 19:14
…nto livekit/uniffi-0.31-cpp17
alan-george-lk
force-pushed
the
livekit/uniffi-0.31-cpp17
branch
from
September 22, 2026 19:25
7d04286 to
8509eb6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Downgrades C++20 support to C++17 (forwards compatible with C++20).
Regressions to be aware of:
.designated_initializer_lists =-- just moved to positional argumentsstd::map::contains-- reverted to classicmap.find()iterator approachstd::endian-- replaced with tiny helper function instead